package com.seednia.module.core.xport;

import java.io.Serializable;
import java.util.Collection;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;

import com.seednia.foundation.framework.dto.AbstractRecord;

/**
 * 
 * @author Young Suk Ahn
 *
 */
@XmlRootElement(name = "XportData", 
		namespace = "http://cmu.edu/tx/1.0/core")
@XmlType(name = "XportData")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlSeeAlso({AbstractRecord.class})
public class XportData implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3362643531375845204L;

	@XmlAttribute
	protected String version;
	
	@XmlAttribute
	protected String processorServiceId;
	
	@XmlElementWrapper(name="XportDataList")
	//@XmlElement(name="XportData")
	@XmlElementRef
	//@XmlAnyElement
	protected Collection<AbstractRecord> records;
	
	public XportData() {}
	
	public XportData(String processorServiceId, Collection<AbstractRecord> records)
	{
		this.processorServiceId = processorServiceId;
		this.records = records;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getProcessorServiceId() {
		return processorServiceId;
	}

	public void setProcessorServiceId(String processorServiceId) {
		this.processorServiceId = processorServiceId;
	}

	public Collection<AbstractRecord> getRecords() {
		return records;
	}

	public void setRecords(Collection<AbstractRecord> records) {
		this.records = records;
	}
	
}
